package fristphase.day9_13;

public class 提取网站关键词 {
    public static void main(String[] args) {
        String path = "http://localhost:8088/myweb/reg?name=zhangsan&pwd=123456&nick=san&age=16";
        String[] arr = path.split("\\?");
        System.out.println("请求:"+arr[0]);
        System.out.println("参数:"+arr[1]);
        String[] arr1 = arr[1].split("&");
        for (int i = 0; i < arr1.length; i++) {
            String[] arr2 = arr1[i].split("=");
            System.out.println("参数名："+arr2[0]+"\t"+"参数值："+arr2[1]);
        }
    }
}
